<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Getting Started</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
<link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">
<link rel="next" href="tutorial.html" title="Tutorial">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="scope_exit.getting_started"></a><a class="link" href="getting_started.html" title="Getting Started">Getting Started</a>
</h2></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="getting_started.html#scope_exit.getting_started.this_documentation">This Documentation</a></span></dt>
<dt><span class="section"><a href="getting_started.html#scope_exit.getting_started.compilers_and_platforms">Compilers
      and Platforms</a></span></dt>
<dt><span class="section"><a href="getting_started.html#scope_exit.getting_started.installation">Installation</a></span></dt>
</dl></div>
<p>
      This section explains how to setup a system to use this library.
    </p>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="scope_exit.getting_started.this_documentation"></a><a class="link" href="getting_started.html#scope_exit.getting_started.this_documentation" title="This Documentation">This Documentation</a>
</h3></div></div></div>
<p>
        Programmers should have enough knowledge to use this library after reading
        the <a class="link" href="../index.html#scope_exit.introduction" title="Introduction">Introduction</a>, <a class="link" href="getting_started.html" title="Getting Started">Getting
        Started</a>, and <a class="link" href="tutorial.html" title="Tutorial">Tutorial</a> sections.
        The <a href="../reference.html" target="_top">Reference</a> section can be consulted
        at a later point for quick reference. All the other sections of this documentation
        can be considered optional.
      </p>
<p>
        Some footnotes are marked by the word "<span class="bold"><strong>Rationale</strong></span>".
        They explain reasons behind decisions made during the design and implementation
        of this library.
      </p>
<p>
        In most of the examples presented in this documentation, the Boost.Detail/LightweightTest
        (<code class="literal">boost/detail/lightweight_test.hpp</code>) macro <code class="computeroutput"><span class="identifier">BOOST_TEST</span></code> is used to check correctness
        conditions. The <code class="computeroutput"><span class="identifier">BOOST_TEST</span></code>
        macro is conceptually similar to <code class="computeroutput"><span class="identifier">assert</span></code>
        but a failure of the checked condition does not abort the program, instead
        it makes <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">report_errors</span></code> return a non-zero program
        exit code. <a href="#ftn.scope_exit.getting_started.this_documentation.f0" class="footnote" name="scope_exit.getting_started.this_documentation.f0"><sup class="footnote">[2]</sup></a>
      </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="scope_exit.getting_started.compilers_and_platforms"></a><a class="link" href="getting_started.html#scope_exit.getting_started.compilers_and_platforms" title="Compilers and Platforms">Compilers
      and Platforms</a>
</h3></div></div></div>
<p>
        The authors originally developed and tested the library on GNU Compiler Collection
        (GCC) C++ 3.3, 3.4, 4.1, 4.2, 4.5.3 (with and without C++11 features <code class="literal">-std=c++0x</code>),
        Microsoft Visual C++ (MSVC) 8.0, and Intel 10.1 under Linux, Cygwin, and
        Windows 7. However, this library should be usable on any compiler that supports
        <a href="http://www.boost.org/libs/typeof" target="_top">Boost.Typeof</a> except:
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
            MSVC 7.1 and 8.0 fail to link if a function with <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
            is included by multiple translation units.
          </li>
<li class="listitem">
            GCC 3.3 cannot compile <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
            inside a template (see <a href="http://lists.boost.org/Archives/boost/2007/02/116235.php" target="_top">http://lists.boost.org/Archives/boost/2007/02/116235.php</a>
            for details).
          </li>
</ul></div>
<p>
        See the library <a href="http://www.boost.org/development/tests/release/developer/scope_exit.html" target="_top">regression
        test results</a> for detailed information on supported compilers and
        platforms. Check the library regression test <a href="../../../test/Jamfile.v2" target="_top"><code class="literal">Jamfile.v2</code></a>
        for any special configuration that might be required for a specific compiler.
      </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="scope_exit.getting_started.installation"></a><a class="link" href="getting_started.html#scope_exit.getting_started.installation" title="Installation">Installation</a>
</h3></div></div></div>
<p>
        This library is composed of header files only. Therefore there is no pre-compiled
        object file which needs to be installed. Programmers can simply instruct
        the compiler where to find the library header files (<code class="computeroutput"><span class="special">-</span><span class="identifier">I</span></code> option on GCC, <code class="computeroutput"><span class="special">/</span><span class="identifier">I</span></code> option on MSVC, etc) and compile code
        using the library.
      </p>
<p>
        The library implementation uses <a href="http://www.boost.org/libs/typeof" target="_top">Boost.Typeof</a>
        to automatically deduce the types of the <a class="link" href="../index.html" title="Chapter&#160;1.&#160;Boost.ScopeExit 1.1.0">Boost.ScopeExit</a>
        captured variables (see the <a class="link" href="tutorial.html" title="Tutorial">Tutorial</a>
        section). In order to compile code in <a href="http://www.boost.org/libs/typeof" target="_top">type-of
        emulation</a> mode, all types should be properly registered using <code class="computeroutput"><span class="identifier">BOOST_TYPEOF_REGISTER_TYPE</span></code> and <code class="computeroutput"><span class="identifier">BOOST_TYPEOF_REGISTER_TEMPLATE</span></code>, or appropriate
        <a href="http://www.boost.org/libs/typeof" target="_top">Boost.Typeof</a> headers
        should be included (see the source code of most examples presented in this
        documentation).
      </p>
</div>
<div class="footnotes">
<br><hr style="width:100; text-align:left;margin-left: 0">
<div id="ftn.scope_exit.getting_started.this_documentation.f0" class="footnote"><p><a href="#scope_exit.getting_started.this_documentation.f0" class="para"><sup class="para">[2] </sup></a>
          <span class="bold"><strong>Rationale.</strong></span> Using Boost.Detail/LightweightTest
          allows to add the examples to the library regression tests so to make sure
          that they always compile and run correctly.
        </p></div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2006-2012 Alexander Nasonov, Lorenzo Caminiti<p>
        Distributed under the Boost Software License, Version 1.0 (see accompanying
        file LICENSE_1_0.txt or a copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
